//
//  BankInformationViewController.m
//  TenThousand
//
//  Created by 我的 on 16/6/22.
//  Copyright © 2016年 baixue. All rights reserved.
//

#import "BankInformationViewController.h"
#import "AddCardViewController.h"

@interface BankInformationViewController ()
@property (weak, nonatomic) IBOutlet UITextField *bankType;
@property (weak, nonatomic) IBOutlet UITextField *pohoeNum;
@property (weak, nonatomic) IBOutlet UIButton *agreeBtn;

@property (weak, nonatomic) IBOutlet UIButton *nextBtn;
@end

@implementation BankInformationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"填写银行信息";
    [self createLeft:[UIImage imageNamed:@"ZHSZicon_03"] leftClick:^{
        [self.navigationController popViewControllerAnimated:YES];
    } right:nil rightClick:nil];
    
    self.agreeBtn.selected = YES;//默认为选中
    
    
}
- (IBAction)nextbtn:(id)sender {
    
    [self getAddBank];
}

- (IBAction)agreeBtn:(UIButton *)sender {
    
    if (sender.selected) {
        sender.selected = NO;
        _nextBtn.enabled = NO;
    }else{
        sender.selected = YES;
        _nextBtn.enabled = YES;
    }
}


    //新增银行卡接口
-(void)getAddBank{
   
    NSString *loginId = [[NSUserDefaults standardUserDefaults] objectForKey:@"LoginId"];
    NSDictionary *para = @{
                           @"LoginId":loginId,
                           @"BankName":@"中国银行",
                           @"BankAnount":@"12636478387489",
                           @"TEL":@"18257191159",
                           @"Branch":@"杭州支行"
                           };
    
    
    [NetWorkManager requestWithType:HttpRequestTypePost withMethodName:@"Users.GetAddBank" withParaments:para withSuccessBlock:^(NSDictionary *object) {
        NSLog(@"%@",object);
    } withFailureBlock:^(NSError *error) {
        NSLog(@"%@",error);
    } progress:nil];
    
 
    
}




@end
